<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../node_modules/vue/dist/vue.global.js"></script>
</head> 
<body>
    <div id="app">
        当前计数为{{count}}
        <button v-on:click="handleclick">点击+1</button>
    </div>
    <script>
        const {createApp} = Vue
        const app = createApp({
            data(){
                return{
                    count:0,
                }   
            },
            methods:{
                handleclick(){
                    console.log('按钮被点击了')
                    this.count++;
                    // console.log('count++');
            },
        },
        })
        app.mount('#app');
    </script>
</body>
</html>